package com.example.wan1.view.wechat;

import com.example.wan1.R;
import com.example.wan1.adapter.ArticleListAdapter;
import com.example.wan1.di.ano.FragmentScope;
import com.example.wan1.model.ArticleBean;

import java.util.ArrayList;
import java.util.List;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;

/***
 * @Author: zxd
 * @CreateDate: 2020/8/26 16:54
 * @Description: 公众号 碎片
 */
@Module
public abstract class WechatFragmentModule {

    //公众号碎片
    @Binds
    abstract WeChatContract.View wechatFragmentView(WeChatFragment weChatFragment);

    @FragmentScope
    @Provides
    static ArticleListAdapter provideWechatFragmentAdapter(List<ArticleBean> list) {
        return new ArticleListAdapter(R.layout.article_item, list);
    }

    @FragmentScope
    @Provides
    static List<ArticleBean> provideArticleList() {
        return new ArrayList<>();
    }
}
